<template>
  <div>
    <el-cascader
      v-model="value"
      :options="catList"
      :props="{label:'cat_name',value:'cat_id'}"
    >
    </el-cascader>
    {{value}}
  </div>
</template>

<script>
import { mapActions, mapState } from 'vuex'
export default {
  name: "",
  props: {},
  data() {
    return {
      value:[]
    };
  },
  computed: {
  ...mapState('cate',['catList'])
  },

  created() {
    if(!this.catList.length){
    this.getAllCate()
    }
  },

  mounted() {},

  watch: {},

  methods: {
    ...mapActions('cate',['getAllCate'])
  },

  components: {}
};
</script>

<style scoped lang="less"></style>
